////////////////////////////////////
//Main JS functions for verisign.com
////////////////////////////////////

function findObj(n, d){
   var p,i,x;  if(!d) d=document;
   if((p=n.indexOf("?"))>0&&parent.frames.length){
      d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);
   }
   if(!(x=d[n])&&d.all) x=d.all[n];
   for(i=0;!x&&i<d.forms.length;i++)x=d.forms[i][n];
   for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document);
   if(!x && d.getElementById) x=d.getElementById(n);
   return x;
}

function controlSubNav(){
   var i,p,v,obj,args=controlSubNav.arguments;
   for (i=0; i<(args.length-2); i+=3)
      if ((obj=findObj(args[i]))!=null){
         v=args[i+2];
            if (obj.style){
               obj=obj.style;
               v=(v=='show')?'visible':(v=='hide')?'hidden':v;
            }
      obj.visibility=v;
   }
}

function swapImgRestore(){
  var i,x,a=document.sr;
  for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function swapImage(){
   var i,j=0,x,a=swapImage.arguments; document.sr=new Array;
   for(i=0;i<(a.length-2);i+=3)
   if ((x=findObj(a[i]))!=null){document.sr[j++]=x;
   if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function preloadImages() {
  var d=document; if(d.images){ if(!d.p) d.p=new Array();
    var i,j=d.p.length,a=preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.p[j]=new Image; d.p[j++].src=a[i];}}
}
//We're using layers and CSS now- so we gotta use the damn netscape4 fix
function reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.pgW=innerWidth; document.pgH=innerHeight; onresize=reloadPage; }}
  else if (innerWidth!=document.pgW || innerHeight!=document.pgH) location.reload();
}
reloadPage(true);


function popuplink(static_url,win_name,win_options,dynamic_url) {

//alert(static_url + "\n" + win_name + "\n" + win_options + "\n" + dynamic_url);

var win_host = window.location.href;
var win_url = "";

if ((win_name == "") || (win_name == " ") || (win_name == undefined)){
   win_name = "pdfWin";}

if ((win_options == "") || (win_options == " ") || (win_options == undefined)){
   win_options = "width=775,height=575,top=150,left=150,resizable,scrollbars,location,menubar,toolbar";}

if ((win_host.indexOf("/stellent/idcplg?IdcService=SS_GET_PAGE&") == -1) || (dynamic_url == "")|| (dynamic_url == " ") || (dynamic_url == undefined))
{
   win_url =static_url;
}
else
{
   win_url = "/stellent/idcplg?IdcService=SS_GET_PAGE&" + dynamic_url;
   //alert(win_url);
}

//alert(win_url + "\n" + win_name + "\n" + win_options);

   popup_win = window.open(win_url, win_name, win_options);
   popup_win.focus();
}

function linkPopUp(url) {
   var scrWidth = parseInt(screen.width/1.035);
   var scrHeight = parseInt(screen.height/1.35);
   var winWidth = 800;
   var winHeight = 550;

   if (scrWidth <= winWidth) {
      winWidth = scrWidth;
      var winLeft = 0;
   } else {
      var winLeft = parseInt((scrWidth - winWidth)/2);
   }

   if (scrHeight <= winHeight) {
      winHeight = scrHeight;
      var winTop = 0;
   } else {
      var winTop = scrHeight - winHeight;
   }
   popupWin = window.open(url, 'pdfWin', 'width=' + winWidth + ',height=' + winHeight + ',top=' + winTop + ',left=' + winLeft + ',screenY=' + winTop + ',screenX=' + winLeft + ',resizable,scrollbars,location,menubar,toolbar');
   popupWin.focus();
}
function linkPop() {
   var exturlPresent;
   var siteName=document.links[0].hostname;
   for(i=0;i<document.links.length;i++){
      var linkList=document.links[i].href;
	  var linkHost=document.links[i].hostname;
      var pdfPresent=linkList.indexOf(".pdf");
      var intlPresent=linkList.indexOf("www.verisign.");
	  var clarifyPresent=linkList.indexOf("go.cgi");
	  var pptPresent=linkList.indexOf(".ppt");
	  var jsPresent=linkList.indexOf("javascript");
	  var mailtoPresent=linkList.indexOf("mailto");
      var nsManagerPresent=linkList.indexOf("nsmanager.verisign-grs.com");
	  var formsPresent=linkList.indexOf("www.verisign.com\/forms");
	  if (linkHost != siteName && jsPresent+mailtoPresent == -2){
         exturlPresent="yes";
	  }else{
		 exturlPresent="no";
      }
      if (intlPresent > 0) {
      	exturlPresent="no";
      }
      if(linkHost == "securitycenter.verisign.com") {
      	exturlPresent="no";
      }
      if(linkHost == "www.verisign.tv") {
      	exturlPresent="yes";
      }
	  if(formsPresent > 0) {
      	exturlPresent="yes";
      }
	  if(linkHost == "ssl-certificate-center.verisign.com") {
      	exturlPresent="no";
      }
      if(linkHost == "products.verisign.com") {
      	exturlPresent="no";
      }
	  if(linkHost == "ssl-certificate-center-enterprise.verisign.com") {
      	exturlPresent="no";
      }
      if(linkHost == "knowledge.verisign.com") {
      	exturlPresent="no";
      }      
      if(linkHost == "research.verisign.com") {
      	exturlPresent="no";
      }
      if(linkHost == "c.moreover.com") {
      	exturlPresent="no";
      }
	 if(linkHost == "trust-center.verisign.com") {
      	exturlPresent="no";
      }
	 if(linkHost == "investor.verisign.com") {
      	exturlPresent="no";
      }
	 if(linkHost == "verisign.taleo.net") {
      	exturlPresent="no";
      }
	 if(linkHost == "press.verisign.com") {
      	exturlPresent="no";
      }
	 if(linkHost == "careers.verisign.com") {
      	exturlPresent="no";
      }
	 if(linkHost == "blogs.verisign.com") {
      	exturlPresent="no";
      }
      if (pdfPresent>0 || clarifyPresent>0 || pptPresent>0 || exturlPresent=="yes" || nsManagerPresent>0){
		document.links[i].onclick = function() {
		  linkPopUp(this.href);
		  return false;
		}	 
		
      }
   }
}

function sendURL() {
mail_str = "mailto:?subject=Thought this might interest you: " + document.title;
mail_str += "&body=I thought you might be interested in this: " + document.title;
mail_str += ". %0A%0AYou can view it at, " + location.href; 
location.href = mail_str;

}
  <!-- //  
  if(window.location.search.indexOf("print")< 0){
  <!-- //  
   var FULLURL = document.URL;
   var ADDON = FULLURL.split("?");
   var printMatch = 'no';

   if (ADDON.length > 1) {
      ADDON = ADDON[1];
      var SUBADD = ADDON.split("&");
      for (i = 0; i < SUBADD.length; i++) {
         NVP = SUBADD[i].split("=");
         if ((NVP[0].match('^print'))&& (NVP[0].length == 5)) {
            printMatch = 'yes';
            //alert(NVP[1]);
         }
      }
   }

   if (printMatch == 'no') {
         document.writeln('<style type="text/css">');
         document.writeln('.printableLink{ display:none;}');
         document.writeln('</style>');
   } else {
         document.writeln('<style type="text/css">');
         //document.writeln('.printFriendly{ display:none;}');
         document.writeln('.emailPrint{ display:none;}');
         document.writeln('#rightCol{ display:none;}');
         document.writeln('#leftCol{ display:none;}');         
         document.writeln('.rightNav{ display:none;}');
         document.writeln('.resourcesNav{ display:none;}');
         document.writeln('.chatNow{ display:none;}');
         document.writeln('.commitBox{ display:none;}');
         document.writeln('.commitBoxText{ display:none;}');
         document.writeln('.requestCallBox{ display:none;}');
         document.writeln('.requestCallText{ display:none;}');
         document.writeln('.IIS_sideNav{ display:none;}');
         document.writeln('.printableLink{ display:show;}');
         document.writeln('</style>');
   }
}   
   
   function popuplinkPrintable(static_url,win_name,win_options,dynamic_url) {
      //alert(static_url + "\n" + win_name + "\n" + win_options + "\n" + dynamic_url);

      var win_host = window.location.href;
      var win_url = "";

      if ((win_name == "") || (win_name == " ") || (win_name == undefined)) {
         win_name = "pdfWin";
      }

      if ((win_options == "") || (win_options == " ") || (win_options == undefined)) {
         win_options = "width=775,height=575,top=150,left=150,resizable,scrollbars,location,menubar,toolbar";
      }

      if ((win_host.indexOf("/stellent/idcplg?IdcService=SS_GET_PAGE&") == -1) || (dynamic_url == "")|| (dynamic_url == " ") || (dynamic_url == undefined)) {
         win_url =static_url;
      } else {
         win_url = "/stellent/idcplg?IdcService=SS_GET_PAGE&" + dynamic_url + "&print";
         //alert(win_url);
      }

      //alert(win_url + "\n" + win_name + "\n" + win_options);

      popup_win = window.open(win_url, win_name, win_options);
      popup_win.focus();
   }
   // -->
function womOn(){
  window.onload = womGo;
}
function womGo(){
  for(var i = 0;i < woms.length;i++)
    eval(woms[i]);
}
function womAdd(func){
  woms[woms.length] = func;
}
var woms = new Array();


function getCookie(name){
var cname = name + "=";               
var dc = document.cookie;             
if (dc.length > 0) {              
begin = dc.indexOf(cname);       
if (begin != -1) {           
begin += cname.length;       
end = dc.indexOf(";", begin);
if (end == -1) end = dc.length;
return unescape(dc.substring(begin, end));
} 
}
return null;
}
function setCookie(name, value) {
var now = new Date();
var then = new Date(now.getTime() + 31536000000);
document.cookie = name + "=" + escape(value) + "; expires=" + then.toGMTString() + "; path=/";
}
function getInfo(form) {
form.info.value = "Browser Information: " + navigator.userAgent;
}
function getValue(element) {
var value = getCookie(element.name);
if (value != null) element.value = value;
}
function setValue(element) {
setCookie(element.name, element.value);
}
function fixElement(element, message) {
alert(message);
element.focus();
}
function isMailReady(form) {
var passed = false;
if (form.CSR.value == "") {
fixElement(form.CSR, "Please copy/paste your CSR in the text area provided.");
}
else if (form.org_first_name.value == "") {
fixElement(form.org_first_name, "Please enter your first name.");
}
else if (form.org_last_name.value == "") {
fixElement(form.org_last_name, "Please enter your last name.");
}
else if (form.org_company.value == "") {
fixElement(form.org_company, "Please enter your organization name.");
}
else if (form.org_title.value == "") {
fixElement(form.org_title, "Please enter job title.");
}
else if (form.org_address_1.value == "") {
fixElement(form.org_address_1, "Please enter your address.");
}
else if (form.org_city.value == "") {
fixElement(form.org_city, "Please enter city.");
}
else if (form.org_state.value == "") {
fixElement(form.org_state, "Please enter state.");
}
else if (form.org_zip.value == "") {
fixElement(form.org_zip, "Please enter zip.");
}
else if (form.org_country.value == "") {
fixElement(form.org_country, "Please enter country.");
}
else if (form.org_telephone.value == "") {
fixElement(form.org_telephone, "Please enter telephone.");
}
else if (form.org_email_address.value.indexOf("@") == -1 ||
form.org_email_address.value.indexOf(".") == -1) {
fixElement(form.org_email_address, "Please enter your email address.");
}
else if (form.tech_first_name.value == "") {
fixElement(form.tech_first_name, "Please enter your first name.");
}
else if (form.tech_last_name.value == "") {
fixElement(form.tech_last_name, "Please enter your last name.");
}
else if (form.tech_company.value == "") {
fixElement(form.tech_company, "Please enter your organization name.");
}
else if (form.tech_title.value == "") {
fixElement(form.tech_title, "Please enter job title.");
}
else if (form.tech_address_1.value == "") {
fixElement(form.tech_address_1, "Please enter address.");
}
else if (form.tech_city.value == "") {
fixElement(form.tech_city, "Please enter city.");
}
else if (form.tech_state.value == "") {
fixElement(form.tech_state, "Please enter state.");
}
else if (form.tech_zip.value == "") {
fixElement(form.tech_zip, "Please enter zip.");
}
else if (form.tech_country.value == "") {
fixElement(form.tech_country, "Please enter country.");
}
else if (form.tech_telephone.value == "") {
fixElement(form.tech_telephone, "Please enter telephone.");
}
else if (form.tech_email_address.value.indexOf("@") == -1 ||
form.tech_email_address.value.indexOf(".") == -1) {
fixElement(form.tech_email_address, "Please enter your email address.");
}
else if (form.bill_first_name.value == "") {
fixElement(form.bill_first_name, "Please enter your first name.");
}
else if (form.bill_last_name.value == "") {
fixElement(form.bill_last_name, "Please enter your last name.");
}
else if (form.bill_company.value == "") {
fixElement(form.bill_company, "Please enter your organization.");
}
else if (form.bill_title.value == "") {
fixElement(form.bill_title, "Please enter job title.");
}
else if (form.bill_address_1.value == "") {
fixElement(form.bill_address_1, "Please enter address.");
}
else if (form.bill_city.value == "") {
fixElement(form.bill_city, "Please enter city.");
}
else if (form.bill_state.value == "") {
fixElement(form.bill_state, "Please enter state.");
}
else if (form.bill_zip.value == "") {
fixElement(form.bill_zip, "Please enter zip.");
}
else if (form.bill_country.value == "") {
fixElement(form.bill_country, "Please enter country.");
}
else if (form.bill_telephone.value == "") {
fixElement(form.bill_telephone, "Please enter telephone.");
}
else if (form.bill_email_address.value.indexOf("@") == -1 ||
form.bill_email_address.value.indexOf(".") == -1) {
fixElement(form.bill_email_address, "Please enter your email address.");
}
else if (!document.form.confirmed.checked) {
fixElement(form.confirmed, "Please agree to the subscriber agreement (click the checkbox) in order to continue.");
}
else {
getInfo(form);
passed = true;
}
return passed;
}

//VeriSign Video Player Popup
function myPopupRelocate() {
	var scrolledX, scrolledY;
	if( self.pageYOffset ) {
		scrolledX = self.pageXOffset;
		scrolledY = self.pageYOffset;
	} else if( document.documentElement && document.documentElement.scrollTop ) {
		scrolledX = document.documentElement.scrollLeft;
		scrolledY = document.documentElement.scrollTop;
	} else if( document.body ) {
		scrolledX = document.body.scrollLeft;
		scrolledY = document.body.scrollTop;
	}

	var centerX, centerY;
	if( self.innerHeight ) {
		centerX = self.innerWidth;
		centerY = self.innerHeight;
	} else if( document.documentElement && document.documentElement.clientHeight ) {
		centerX = document.documentElement.clientWidth;
		centerY = document.documentElement.clientHeight;
	} else if( document.body ) {
		centerX = document.body.clientWidth;
		centerY = document.body.clientHeight;
	}
	
	var leftOffset = scrolledX + (centerX - 858) / 2;
	var topOffset = scrolledY + (centerY - 505) / 2;
	
	document.getElementById("video-popup").style.top = topOffset + "px";
	document.getElementById("video-popup").style.left = leftOffset + "px";
}

function setOpacity( value ) {
	document.getElementById("video-popup").style.opacity = value / 10;
	document.getElementById("video-popup").style.filter = 'alpha(opacity=' + value * 10 + ')';
}

function fadeInMyPopup() {
	for( var i = 0 ; i <= 100 ; i++ )
		setTimeout( 'setOpacity(' + (i / 10) + ')' , 8 * i );
}

function showVideoPopup(){
	//Locate window position
	myPopupRelocate();
	
	//Rewrite the player to the popup
	so.write('player');
	
	//Display the popup
	document.getElementById("video-popup").style.display = "block";
	if(document.getElementById("selAction")){
		document.getElementById("selAction").style.display = "none";
	}
	
}

function hideVideoPopup(){
	//Remove popup window
	document.getElementById("video-popup").style.display = "none";
	if(document.getElementById("selAction")){
		document.getElementById("selAction").style.display = "inline";
	}

	//Remove player so it stops playing
	document.getElementById("player").innerHTML = "";
	document.getElementById("player").innerHTML = 'Please install the latest <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=shockwaveFlash">Adobe Flash Player</a>.';
}


//Slide Show
function contractall(){
	var inc=1
	while (document.getElementById("slide"+inc)){
	document.getElementById("slide"+inc).style.display="none"
	inc++
	}
}
function expandone(){
	//alert(selectedDiv)
	var selectedDivObj=document.getElementById("slide"+selectedDiv)
	//alert(selectedDivObj.id)
	contractall()
	document.getElementById("slides").innerHTML=selectedDivObj.getAttribute("subject")
	selectedDivObj.style.display="block"
	selectedDiv=(selectedDiv<totalDivs-1)? selectedDiv+1 : 1
	t=setTimeout("expandone()",tickspeed)
}
function startscroller(){
	while (document.getElementById("slide"+totalDivs)!=null)
	totalDivs++
	expandone()
	if (!enablesubject)
		document.getElementById("slides").style.display="none"
}
function rOn(id){
	var div = document.getElementById(id);
	div.style.display = "block";		
}
function rOff(id){
	var div = document.getElementById(id);
	div.style.display = "none";
}


//VeriSign Video for multiple popup videos in the same page
function myPopupRelocate1(id,pid) {
	var scrolledX, scrolledY;
	if( self.pageYOffset ) {
	scrolledX = self.pageXOffset;
	scrolledY = self.pageYOffset;
	} else if( document.documentElement && document.documentElement.scrollTop ) {
	scrolledX = document.documentElement.scrollLeft;
	scrolledY = document.documentElement.scrollTop;
	} else if( document.body ) {
		scrolledX = document.body.scrollLeft;
		scrolledY = document.body.scrollTop;
	}
		
	var centerX, centerY;
	if( self.innerHeight ) {
	centerX = self.innerWidth;
	centerY = self.innerHeight;
	} else if( document.documentElement && document.documentElement.clientHeight ) {
		centerX = document.documentElement.clientWidth;
		centerY = document.documentElement.clientHeight;
	} else if( document.body ) {
		centerX = document.body.clientWidth;
		centerY = document.body.clientHeight;
	}
			
	var leftOffset = scrolledX + (centerX - 858) / 2;
	var topOffset = scrolledY + (centerY - 505) / 2;
	document.getElementById(id).style.top = topOffset + "px";
	document.getElementById(id).style.left = leftOffset + "px";
}
			
function showVideoPopup1(id,pid,swfObj){
	//Locate window position
	myPopupRelocate1(id,pid);
	swfObj.write(pid);	
	document.getElementById(id).style.display = "block";
	//Display the popup
			
	if(document.getElementById("selAction")){
		document.getElementById("selAction").style.display = "none";
	}
			
}
		
function hideVideoPopup1(id,pid){
	//Remove popup window
	document.getElementById(id).style.display = "none";
	if(document.getElementById("selAction")){
		document.getElementById("selAction").style.display = "inline";
	}
			
	//Remove player so it stops playing
	document.getElementById(pid).innerHTML = "";
	document.getElementById(pid).innerHTML = 'Please install the latest <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=shockwaveFlash">Adobe Flash Player</a>.';
}

function showVideoPopup1_oo(id,pid){
	//Locate window position
	myPopupRelocate1(id,pid);
	document.getElementById(id).style.display = "block";
	//Display the popup
			
	if(document.getElementById("selAction")){
		document.getElementById("selAction").style.display = "none";
	}
			
}
		
function hideVideoPopup1_oo(id,pid){
	//Remove popup window
	document.getElementById(id).style.display = "none";
	if(document.getElementById("selAction")){
		document.getElementById("selAction").style.display = "inline";
	}
			
	//Remove player so it stops playing
	//document.getElementById(pid).innerHTML = "";
	//document.getElementById(pid).innerHTML = 'Please install the latest <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=shockwaveFlash">Adobe Flash Player</a>.';
}	

function showVideoPopupinCarousel(id,pid,swfObj,liid){
	//Locate window position
	myPopupRelocate1(id,pid);
	swfObj.write(pid);	
	document.getElementById(id).style.display = "block";
	document.getElementById(liid).style.display = "block";
	//Display the popup
			
	if(document.getElementById("selAction")){
		document.getElementById("selAction").style.display = "none";
	}
}

function showVideoPopupinCarousel_oo(id,pid,liid){
	//Locate window position
	myPopupRelocate1(id,pid);
	document.getElementById(id).style.display = "block";
	document.getElementById(liid).style.display = "block";
	//Display the popup
			
	if(document.getElementById("selAction")){
		document.getElementById("selAction").style.display = "none";
	}
}

function showVideoPopup_oo(){
	//Locate window position
	myPopupRelocate();
	
	//Rewrite the player to the popup
	//so.write('player');
	
	//Display the popup
	document.getElementById("video-popup").style.display = "block";
	if(document.getElementById("selAction")){
		document.getElementById("selAction").style.display = "none";
	}
	
}

function hideVideoPopup_oo(){
	//Remove popup window
	document.getElementById("video-popup").style.display = "none";
	if(document.getElementById("selAction")){
		document.getElementById("selAction").style.display = "inline";
	}

	//Remove player so it stops playing
	//document.getElementById("player").innerHTML = "";
	//document.getElementById("player").innerHTML = 'Please install the latest <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=shockwaveFlash">Adobe Flash Player</a>.';
}

/* ---------------------- */
/* Ooyala Movie functions */
/* ---------------------- */
function showMovie(popup_id) {
	myMoviePopupRelocate(popup_id);
	document.getElementById(popup_id).style.display = "block";
	if(document.getElementById("selAction")){
		document.getElementById("selAction").style.display = "none";
	}
}

function hideMovie(popup_id, player_id) {
	var browserName=navigator.appName;
	if (browserName=="Microsoft Internet Explorer") {
		document.getElementById(player_id).setPlayheadTime(0);
		document.getElementById(player_id).pauseMovie();
	}
	document.getElementById(popup_id).style.display = "none";
	if(document.getElementById("selAction")){
		document.getElementById("selAction").style.display = "inline";
	}
}

//VeriSign Video for multiple popup videos in the same page
function myMoviePopupRelocate(id) {
	var scrolledX, scrolledY;
	if( self.pageYOffset ) {
	scrolledX = self.pageXOffset;
	scrolledY = self.pageYOffset;
	} else if( document.documentElement && document.documentElement.scrollTop ) {
	scrolledX = document.documentElement.scrollLeft;
	scrolledY = document.documentElement.scrollTop;
	} else if( document.body ) {
		scrolledX = document.body.scrollLeft;
		scrolledY = document.body.scrollTop;
	}
		
	var centerX, centerY;
	if( self.innerHeight ) {
	centerX = self.innerWidth;
	centerY = self.innerHeight;
	} else if( document.documentElement && document.documentElement.clientHeight ) {
		centerX = document.documentElement.clientWidth;
		centerY = document.documentElement.clientHeight;
	} else if( document.body ) {
		centerX = document.body.clientWidth;
		centerY = document.body.clientHeight;
	}
			
	var leftOffset = scrolledX + (centerX - 858) / 2;
	var topOffset = scrolledY + (centerY - 505) / 2;
	document.getElementById(id).style.top = topOffset + "px";
	document.getElementById(id).style.left = leftOffset + "px";
}

